package com.mfangsoft.zhuangjialong.integration.usermanage.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.mfangsoft.zhuangjialong.common.utils.stereotype.WriterRepository;
import com.mfangsoft.zhuangjialong.integration.usermanage.model.UserManagerActivityTask;
@WriterRepository
public interface UserManagerActivityTaskMapper {
    /**
     * 通过主键删除  
     *
     * @MLTH_generated
     */
    int deleteByPrimaryKey(Long id);

    /**
     * 插入数据  
     *
     * @MLTH_generated
     */
    int insert(UserManagerActivityTask record);

    int insertSelective(UserManagerActivityTask record);

    /**
     * 通过主键查询数据 
     *
     * @MLTH_generated
     */
    UserManagerActivityTask selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(UserManagerActivityTask record);

    /**
     * 通过主键更新数据  
     *
     * @MLTH_generated
     */
    int updateByPrimaryKey(UserManagerActivityTask record);

    /**
     * 插入导购活动任务的关系表
     * @param shopId
     * @param id
     */
	int insertUsermanagerActivityTaskShopRelation(@Param(value = "shopId") Long shopId, @Param(value = "id") Long id);

	/**
	 * 人员中活动任务的查看详情店铺树
	 * @param activityTaskId
	 * @return
	 */
	List<Map<String, Object>> selectUserTreeByActivityTaskId(Long activityTaskId);

	/**
	 * 人员中活动任务的查看详情导购树
	 * @param activityTaskId
	 * @return
	 */
	List<Map<String, Object>> selectUserManagerTreeByActivityTaskId(Long activityTaskId);

	/**
	 * 活动任务和店铺的关系表的删除
	 * @param activityTaskId
	 */
	void deleteRelationByActivityTaskId(Long activityTaskId);

	/**
	 * 导购任务表的删除
	 * @param activityTaskId
	 */
	void deleteUserManagerTaskByActivityTaskId(Long activityTaskId);

	/**
	 * 人员中活动任务的查看详情店铺树回显用
	 * @param activityTaskId
	 * @return
	 */
	List<Map<String, Object>> selectUserTreeByActivityTaskId1(Long activityTaskId);

	/**
	 * 人员中活动任务的查看详情导购树回显用
	 * @param activityTaskId
	 * @return
	 */
	List<Map<String, Object>> selectUserManagerTreeByActivityTaskId1(Long activityTaskId);
}